//
//  Common.swift
//  pai
//
//  Created by diaojz on 2017/4/12.
//  Copyright © 2017年 SHIELD. All rights reserved.
//

import UIKit

// 当前系统版本
let kVersion = (UIDevice.current.systemVersion as NSString).floatValue
// 屏幕宽度
let kScreenH = UIScreen.main.bounds.height
// 屏幕高度
let kScreenW = UIScreen.main.bounds.width

// MARK: - 颜色方法
func RGBA (r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat) -> UIColor {
    return UIColor (red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a)
}

// MARK: - 自定义打印方法
func log<T>(_ message: T, file: String = #file, funcName: String = #function, lineNum: Int = #line) {

    #if DEBUG

        let fileName = (file as NSString).lastPathComponent

        print("\(fileName):(\(lineNum))-\(message)")

    #endif
}
